package com.movie.api.controller;

import com.movie.api.model.dto.LoginDto;
import com.movie.api.service.UserIsVipService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("/vip")
public class TestVip {
    @Resource
    private UserIsVipService userIsVipService;
//    @Resource
//    private IsVip VIP;
    @GetMapping("/isvip")
    public boolean isVip(@RequestBody LoginDto loginDto){
        log.info("loginDto:{}",loginDto);
        return userIsVipService.isVip(loginDto.getUsername());

    }
}
